Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(view): fix pjax support for mathjax #1334

Merged
merged 1 commit into from
Dec 21, 2024
Merged

Conversation

isHarryh
Copy link
Contributor

修复问题

#1327 :使用 pjax 时 MathJax 未在新页面重新加载,从而导致数学公式无法在新页面渲染。

解决方案

监听 pjax:complete 事件。当该事件触发时,判断是否已导入 MathJax。如果已导入,则调用 MathJax 的 typesetPromise() 方法来重新渲染数学公式。


Problem Fixed

#1327 : Math formulas not rendered in new pages because pjax banned the reloading of MathJax.

Solution

Listen on pjax:complete event. When the event triggered, see whether MathJax has been imported, then invoke typesetPromise() to re-render math formulas.

@ppoffice ppoffice merged commit c8542f8 into ppoffice:master Dec 21, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants